<?php $this->load->view('home/layout/header') ?>
<!--  -->
<div class="widthMax award page_1">
	<header data-am-widget="header"  class="am-header">
	    <div class="am-header-left am-header-nav">
	        <a href="javascript:history.go(-1);" >
	            <i class="iconfont icon-zuojiantou"></i>
	        </a>
	    </div>
	    <h1 class="am-header-title">
	        <a href="javascript:;" id="lottery-name" >
                <?php echo $lottery->lottery_name; ?>
            </a>
	    </h1>
	</header>
	<div class="head lotery-award-head">
		<div class="verify awards-link">
			<a href="javascript:;">
				<i class="iconfont">&#xe65e;</i>
				<p>颁奖验证</p>
			</a>
		</div>
        <div id="winners-total"> 
                <!-- 抽奖 中奖人数统计 -->
        </div>
		
	</div>
	<ul class="navlink am-cf">
		<li class="am-dropdown" data-am-dropdown>
			<a href="javascript:;" class="am-link am-dropdown-toggle" data-am-dropdown-toggle>全部<span class="caret"></span></a>
            <ul class="am-dropdown-content" data-tag="status">
                <li data-val="0"><a href="javascript:;">全部</a></li>
                <li data-val="1"><a href="javascript:;">未领奖</a></li>
                <li data-val="2"><a href="javascript:;">待发奖</a></li>
                <li data-val="3"><a href="javascript:;">已发奖</a></li>
            </ul>
		</li>
		<li class="am-dropdown" data-am-dropdown>
			<a href="javascript:;" class="am-link am-dropdown-toggle" data-am-dropdown-toggle>奖品类型<span class="caret"></span></a>
			<ul class="am-dropdown-content" data-tag="prize_type">
                <li data-val="0"><a href="javascript:;">全部</a></li>
			    <li  data-val="1"><a href="javascript:;">实物</a></li>
			    <li  data-val="2"><a href="javascript:;">虚拟奖品</a></li>
			</ul>
		</li>
		<li class="am-dropdown" data-am-dropdown>
			<a href="javascript:;" class="am-link am-dropdown-toggle" data-am-dropdown-toggle>中奖时间<span class="caret"></span>
            </a>
            <ul class="am-dropdown-content" data-tag="dateType">
                <li data-val="1"><a href="javascript:;">最近一天</a></li>
                <li data-val="7"><a href="javascript:;">最近七天</a></li>
                <li data-val="30"><a href="javascript:;">最近一个月</a></li>
                <li data-val="90"><a href="javascript:;">最近三个月</a></li>
                <li data-val="year"><a href="javascript:;">最近一年</a></li>
			</ul>
        </li>
		</li>
		<li class="am-dropdown" data-am-dropdown>
			<a href="javascript:;" class="am-link am-dropdown-toggle" data-am-dropdown-toggle>
                奖项<span class="caret"></span>
            </a>
            <ul class="am-dropdown-content" data-tag="grade">
                <li data-val="0"><a href="javascript:;">全部</a></li>
                <?php foreach(prizeGrade() as $key=>$value) : ?>
                <li data-val="<?php echo $key; ?>">
                    <a href="javascript:;"><?php echo $value, '等奖' ?></a>
                </li>
                <?php endforeach; ?>
            </ul>
		</li>
	</ul>
	<form class="search-form" id="lottery-award-form">
        <input type="hidden" name="lottery_id" value="<?php echo $lottery->lottery_id; ?>">
        <input type="hidden" name="status">
        <input type="hidden" name="prize_type">
        <input type="hidden" name="grade">
        <input type="hidden" name="dateType">
        <input type="hidden" name="pages" value="0">
        <div class="search-input">
            <input type="text" name="user_name" placeholder="请输入中奖者关键词">
            <i class="iconfont i-search">&#xe668;</i>
        </div>
    </form>
    
    <div class="award-list">
    	<ul id="winners-list">
            <!-- 中奖类别 -->
    	</ul>
        <div class="search-more-show  am-scrollspy-init am-scrollspy-inview am-animation-fade am-hide" id="winner-scrollspy">
            <i class="iconfont am-animation-spin">&#xe669;</i>
        </div>
        <div class="search-more-no am-hide">
            没有更多显示了
        </div>
    </div>
    <div class="no-award-item am-hide">
        <img src="/skins/home/images/noitem.png" />
        <p>暂无中奖信息</p>
    </div>
</div>

<div class="widthMax award search-list page_2">
	<header class="header am-cf">
	    <a href="javascript:history.go(-1);" class="return">
	        <i class="iconfont icon-zuojiantou"></i>
	    </a>
	    <form class="search-form" id="page2-search-form">
		    <div class="search-input">
		        <input type="text" value="" placeholder="请输入中奖者关键词" name="username_key">
		        <i class="iconfont clear">&#xe62f;</i>
		    </div>
	    	<a href="javascript" id="page2-submit-form" class="search-btn">搜索</a>
		</form>
	</header>
</div>

<div class="am-modal user-detail-modal user-detail-modal-scene" id="user-detail-modal-scene">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">中奖用户详情
      <a href="javascript: void(0)" class="am-close iconfont" data-am-modal-close>&#xe62f;</a>
    </div>
  </div>
</div>

<?php $this->load->view('home/layout/tip'); ?>
<?php $this->load->view('home/layout/footer'); ?>
<?php js('home', 'pages/award');?>

<script type="text/javascript">
$(function(){
     $('.search-input').on('propertychange input','input',function(){
        if($(this).val().length>0){
           $('.search-input').find('.clear').show();
        }else{
           $('.search-input').find('.clear').hide();
        }
    });
    $('.search-input').on('click','.clear',function(){
        $('.search-input').find('input').val('');
        $(this).hide();
    });
})
</script>